<template>
  <div id="app">
    <img src="./assets/logo.png">
    <ul>
      <li>
        <router-link to="/">首页</router-link>
      </li>
      <li>
        <router-link to="/product/456">商品列表</router-link>
      </li>
    </ul>
    <button @click="jump">使用按钮跳转</button>
    <!--  <router-view/> 使用路由规则替换成对应的组件  -->
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  methods:{
    jump:function () {
      return this.$router.push("/product/456");
    }
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
